package com.shenglue.ssi.service;

import java.util.List;

import com.shenglue.ssi.dao.DicCatDao;
import com.shenglue.ssi.domain.BuyInMain;
import com.shenglue.ssi.domain.DicCat;

public class DicCatServiceImpl implements DicCatService {

	private DicCatDao dealerDao;
	
	public DicCatDao getDicCatDao() {
		return dealerDao;
	}

	public void setDicCatDao(DicCatDao dealerDao) {
		this.dealerDao = dealerDao;
	}

	/**
	 * 查询所有经销商信息
	 */
	public List<DicCat> selectAllDicCat() {
		return dealerDao.selectAllDicCat();
	}

	/**
	 * 增加经销商记录
	 */
	public boolean saveDicCat(DicCat dealer){
		return dealerDao.saveDicCat(dealer);
	}

	/**
	 * 删除经销商记录
	 */
	public boolean deleteDicCat(int buyInId) {
		return dealerDao.deleteDicCat( buyInId );
	}

	/**
	 * 修改经销商记录
	 */
	public boolean updateDicCat(DicCat dealer){
		return dealerDao.updateDicCat(dealer);
	}
	/**
	 * 为修改，根据 Id 查一条 入库单主表记录
	 */
	public DicCat getOneDicCatForUpdate( int dealerId ){
		
		return dealerDao.getOneDicCatForUpdate( dealerId );
	}
}
